(function(){"use strict";if(typeof requestAnimationFrame==="undefined"){var t=1e3/60;var n=function(n){setTimeout(function(){n((new Date).getTime())},t)}}else{var n=requestAnimationFrame}function i(t,n,i){return t*(i-n)+n}function e(t){var n=t<.5?t*2:(1-t)*2;n*=n*n*n;return t<.5?n/2:1-n/2}function r(t){t*=t*t*t;return t}function a(t){var n=1-t;n*=n*n*n;return 1-n}function u(t,n,i,e){this._object=t;this._key=n;this._from=i;this._to=e}u.prototype.interpolate=function(t){this._object[this._key]=i(t,this._from,this._to)};function l(t,n,i,e,r){this._finished=false;this._startTime=null;this._duration=t;this._easing=n==null?a:n;this._onComplete=i;this._tweens=e;this._chart=r}l.prototype.cancel=function(){this._finished=true;this._startTime=null;this._duration=null;this._easing=null;this._onComplete=null;this._tweens=null;this._chart=null};l.prototype._onFrame=function(t){if(this._finished){return true}else if(this._startTime===null){this._startTime=t;return false}else{var n=t-this._startTime;if(n<this._duration){this._tick(n/this._duration);return false}else{this._end(1);this.cancel();return true}}};l.prototype._tick=function(t){t=this._easing(t);var n=this._tweens;for(var i=0;i<n.length;++i){n[i].interpolate(t)}c(f,this._chart)};l.prototype._end=function(t){this._tick(t);this._onComplete()};function o(){this._animating=false;this._animations=[];this._onBeforeFrames=[];this._onAfterFrames=[];var t=this;this._raf=function(n){t._onFrame(n)}}o.prototype.animate=function(t){this._animations.push(t);if(!this._animating){this._animating=true;n(this._raf)}};o.prototype.onBeforeFrame=function(t){this._onBeforeFrames.push(t)};o.prototype.onAfterFrame=function(t){this._onAfterFrames.push(t)};o.prototype._onFrame=function(t){var i=this._onBeforeFrames;for(var e=0;e<i.length;++e){i[e](t)}var r=this._animations;for(var e=0;e<r.length;++e){var a=r[e];if(a._onFrame(t)){r.splice(e,1);--e}}var u=this._onAfterFrames;for(var e=0;e<u.length;++e){u[e](t)}if(r.length===0){this._animating=false}else{n(this._raf)}};var s=new o;var f=[];function h(t){return t!==t}function m(t,n){for(var i=0;i<t.length;++i){n(t[i])}}function c(t,n){for(var i=0;i<t.length;++i){if(t[i]===n){return}}t.push(n)}s.onAfterFrame(function(){for(var t=0;t<f.length;++t){f[t].validateData()}f.length=0});function v(t,n,i){if(!n[i]){n[i]=true;t.push(i)}}function p(t,n,i,e){m(e,function(e){var r=i[e];if(r!=null){v(t,n,r)}})}function _(t,n,i){p(n,i,t,["alphaField","valueField"])}function d(t,n,i){_(t,n,i)}function y(t,n,i){_(t,n,i);p(n,i,t,["labelRadiusField"])}function F(t,n,i){p(n,i,t,["alphaField","bulletSizeField","closeField","dashLengthField","errorField","highField","lowField","openField","valueField"])}function g(t,n,i){F(t,n,i);p(n,i,t,["xField","yField"])}function x(t,n,i,e){m(t,function(t){e(t,n,i)})}function M(t,n,i){p(n,i,t,["widthField"])}function w(t){var n=[];var i={};if(t.type==="funnel"){d(t,n,i)}else if(t.type==="pie"){y(t,n,i)}else if(t.type==="serial"){M(t.categoryAxis,n,i);x(t.graphs,n,i,F)}else if(t.type==="radar"){x(t.graphs,n,i,F)}else if(t.type==="xy"){x(t.graphs,n,i,g)}return n}function A(t){var n={};if(t.type==="serial"||t.type==="radar"||t.type==="xy"){m(t.valueAxes,function(t){if(n[t.id]==null){n[t.id]={minimum:t.minimum,maximum:t.maximum};var i=t.minRR;var e=t.maxRR;var r=e-i;var a;if(r===0){a=Math.pow(10,Math.floor(Math.log(Math.abs(e))*Math.LOG10E))/10}else{a=Math.pow(10,Math.floor(Math.log(Math.abs(r))*Math.LOG10E))/10}if(t.minimum==null){t.minimum=Math.floor(i/a)*a-a}if(t.maximum==null){t.maximum=Math.ceil(e/a)*a+a}}})}return n}function T(t,n){if(t.type==="serial"||t.type==="radar"||t.type==="xy"){m(t.valueAxes,function(t){var i=n[t.id];if(i!=null){if(i.minimum==null){delete t.minimum}if(i.maximum==null){delete t.maximum}}})}}function b(t){if(t.type==="funnel"||t.type==="pie"){return t.titleField}else if(t.type==="serial"||t.type==="radar"){return t.categoryField}}function k(t,n){var i=t[n];if(i==null){return null}else{i=+i;if(h(i)){return null}else{return i}}}function R(t,n){var i=t[n];if(i==null){return null}else{return""+i}}function B(t,n){var i={};m(t,function(t){var e=R(t,n);if(e!=null){i[e]=t}});return i}function C(t,n,i,e){var r=[];m(t,function(t){var a=R(t,n);if(a!=null&&a in i){var l=i[a];m(e,function(n){var i=k(l,n);var e=k(t,n);if(i!=null&&e!=null){r.push(new u(t,n,i,e))}})}});return r}function D(t,n,i){var e=[];var r=Math.min(t.length,n.length);for(var a=0;a<r;++a){var l=t[a];var o=n[a];m(i,function(t){var n=k(l,t);var i=k(o,t);if(n!=null&&i!=null){e.push(new u(o,t,n,i))}})}return e}function L(t,n){if(t.type==="xy"){var i=w(t);return D(t.dataProvider,n,i)}else{var e=b(t);var i=w(t);var r=B(t.dataProvider,e);return C(n,e,r,i)}}function P(t,n){var i=this;var e=L(i,t);var r=A(i);i.dataProvider=t;function a(){T(i,r);if(n.complete!=null){n.complete()}}var u=new l(n.duration,n.easing,a,e,i);s.animate(u);return u}AmCharts.addInitHandler(function(t){t.animateData=P},["funnel","pie","serial","radar","xy"])})();
//# sourceMappingURL=animate.map.js